<?php

namespace app\data\model;
use think\admin\Model;
class DataUnilateralism extends Model
{
    public static function getDetail(string $field = '', $where = []): array
    {
       $info = self::mk()->where($where)->field($field)->find();
       if(empty($info)){
           return [];
       }else{
           return $info->toArray();
       }
    }

    public static function getLists(string $field = '', $where = []): array
    {
       $lists = self::mk()->where($where)->field($field)->select();
       if(empty($lists)){
           return [];
       }else{
           return $lists->toArray();
       }
    }
}
